/**
 * Created by chenweicheng on 11/7/17.
 */

import React, {PureComponent} from 'react'
import {StackNavigator, TabNavigator, TabBarBottom, TabBarTop} from 'react-navigation';
import {createStackNavigator} from 'react-navigation';
import {StatusBar, View, BackHandler, ToastAndroid, Animated, Easing, Platform, Alert} from 'react-native'

import HomeScene from '../scene/HomeScene'
import ScanCodeScene from '../scene/ScanCodeScene'
import ScanCodeResultScene from '../scene/ScanCodeResultScene'
import GetDataScene from '../scene/GetDataScene'
import TestTcp from '../scene/TestTcp'
import DetailChartScene from '../scene/DetailChartScene'


import App from '../../App'
export  default class RootScene extends PureComponent {
    constructor(props) {
        super(props)


    }

    render() {
        return (
            <RootStack
                onNavigationStateChange={(prevState, currentState) => { }  }
                screenProps={{ ble:null}}
            />)
    }
}


const Stacks = {
    App: {screen: App},
    HomeScene: {screen: HomeScene},
    ScanCodeScene: {screen: ScanCodeScene},
    ScanCodeResultScene: {screen: ScanCodeResultScene},
    GetDataScene: {screen: GetDataScene},
    TestTcp: {screen: TestTcp},
    DetailChartScene: {screen: DetailChartScene},
}


const RootStack = createStackNavigator(
    Stacks,
    {
        navigationOptions: {
            // headerStyle: { backgroundColor: color.theme }
            headerBackTitle: null,

            headerTintColor: '#333333',
            showIcon: true,
            headerTitleStyle: {
                textAlign: 'center',
                flex: 1
            }
        },
        initialRouteName: 'HomeScene',
    }
);





